<template>
	<view class="center">
		<u--text  mode="link" :block="true" :align="'center'" :size="18" bold text="点击前往" :href="url" ></u--text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: ''
			}
		},
		onLoad(val) {
			console.log(val)
			this.url = val.url	
			this.setTitle()
			this.addBrush()
		},
		methods: {
			// 设置title
			setTitle() {
				uni.setNavigationBarTitle({
					title: '学习通刷课'
				})
			},
			async addBrush () {	
				try {
					console.log('OK123')
					const {data: res} = await uni.$http.get('/user/addbrush');
					console.log(res)
 				} catch (e) {
					console.log(e)
				}
			}
		}
	}
</script>

<style scoped>
	.center {
		display: flex;
		align-items: center;
		justify-content: center;
	}
</style>
